{% extends 'base.html' %}

{% block content %}
<h1>人物列表</h1>

<style>
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
}
th {
    background-color: #f2f2f2;
}
td {
    vertical-align: top;
}
.involvement-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
</style>

<table>
    <thead>
        <tr>
            <th>姓名</th>
            <th>职位</th>
            <th>发布日期</th>
            <th>参与情况</th>
            <th>链接</th>
        </tr>
    </thead>
    <tbody>
        {% for person in persons %}
        <tr>
            <td>{{ person.name }}</td>
            <td>{{ person.position }}</td>
            <td>{{ person.pub_date|date:"Y年n月j日" }}</td>
            <td class="involvement-cell" title="{{ person.involvement }}">{{ person.involvement }}</td>
            <td><a href="{{ person.link }}">查看详情</a></td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}